package com.eight.controller;

import com.eight.pojo.SysMenu;
import com.eight.service.PermissionService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: TODO
 * @Author: Van.Planifolia
 * @CreateTime: 2023-02-23  16:17
 * @Version: 1.0
 */
@RestController
@RequestMapping("/system/permission")
public class PermissionController {
    @Resource(name = "permissionService")
    private PermissionService permissionService;

    @GetMapping("/getPermission/{name}")
    public List<SysMenu> getPermissionByName(@PathVariable String name){
        return permissionService.getPermissionByName(name);
    }
}
